--------------------------------------------------------------------------------------------------
Genesis Plus GX Sega Genesis/Megadrive/32X/SegaCD/MegaCD/SMS/GG Emulator for XBox v2 Madmab Ed

* Version bump!  :P

* Updated to madmab edition interface CFv1b41. See "Interface Changelog.txt"

* Fixed a long standing bug in the CD cache code that would crash the emu if the cache size was not evenly divisible by the sector size.

* Fixed issue where selecting a cue/iso/mp3 combination was not defaulting to the Neogenesis core like it should be.

* Fixed issue where setting "Autostart Last Played Game" to Yes would cause the emulator to either crash on game exit or not properly return to the correct current directory (depending on which version of NeoGenesisPlusGX you were using).

* Fixed issue when launching a game with a cut file would cause the emulator to either crash on game exit or not properly return to the correct current directory (depending on which version of NeoGenesisPlusGX you were using).

* Added CHD to the default emu filter list.  Pushed BIN to the end of the list for easy removal if you use redump images.

* Added in support for CHD files local and networked!  (both cores)

* Note to self: had to reverse the orders of functions called in lzma_codec_free cause the first one was killing the allocator needed to be released on the second one.

* Country tables were reversed for the Neogenesis and the Genesis Plus GX core.

* Fixed issue where synopsis info was not displaying for CD games.  Also fixed an issue where the CD ID was not displaying properly.  I'm not sure if this affects other emulator cores.

* Now displays global message "Using default game configuration." when default game configuration is set and no game configuration is found.

* No game exit transition displayed when game is autolanched.


* Added in support for iso / ogg CD images ( Genesis Plus GX core only ).  Works rather well on network shares!

* Port A and Port B Devices now default to Control Pad 3 button since not all games are compatible with 6 button and only a few use 6 button anyways.

* Fixed issue where setting the Default Game Configuration was causing havoc when SMS or GG games were selected.  Causing all kinds of weird issues like control input not working or incorrect accurate pixel settings being selected for sms/gg games among other things.

* Fixed selectable Port A and Port B devices for SMS/GG.  Please note that currently only Control Pad 2 Button is fully supported for sms/gg.

++++++++++++++++++++++
list of update commits
++++++++++++++++++++++

[CHD]

* Fix crash loading CHD on some ARM boards (minimal changes)

[Core/68k]

* Fixed NBCD insruction when using register operand

[Core/CD]

* Fixed track relative time computation during pregap

* Fixed CD hardware buffer initialization when using dynamic memory allocation

* Added support for Wondermega & Wondermega M2/X'Eye specific fader hardware (fixes CD-DA issues and freeze when using Wondermega, Wondermega M2 or X'Eye BIOS)

* Improved CDD status codes description & added support for (unused ?) error request code

* Improved accuracy of Word-RAM byte writes (verified on schematic)

* Fixed Main-CPU/Sub-CPU synchronization edge case

* Increased CD access latency (fixes "Aisle Lord (J)")

* Improved CD hardware reset timing accuracy on software reset

* Improved WAV file detection/support

* Optimized accesses to CDC RAM on little-endian platforms

* Added support for CD-ROM Mode 2 (Form 1 & 2) image files (fixes EBXA disc support in Wonder Library)

* Improved CUE file parsing (fixes issue with CUE files mixing single-track and multiple-tracks files)

* Fixed reported CDD status after CD play command when seek time is emulated (fixes music playback delay in Bari Arm)

* Incremented CD_PLAY status delay by one CDD interrupt (fixes regression freeze in Annet Futatabi introduced by previous change)

* Improved Timer interrupt timings and CDD interrupt accuracy (fixes audio stutters during Popful Mail FMV)

* Fixed loading issue when backup RAM cart is filled with non-zero data

* Added support for first revision of Sewer Shark (no audio track)

* Optimized CUE and CHD file detection

* Fixed word access to CDD control register (fixes spurious audio track playback on startup with Mode 1 patched games using MSU-MD driver)

* Improved CDD status report accuracy (fixes track looping with Mode 1 patched games using MSU-MD driver)

* Fixed CD communication registers state on peripheral reset (fixes SUB-CPU side initialization in MSU-MD sample demo and some Mode 1 patched games using MSU-MD driver)

* Improved CD audio savestate and CD file seeking (in preparation for MegaSD support)

* Fixed track index when decoding CUE file MegaSD specific loop commands

* Added configurable CD-DA and PCM outputs mixing volume
* Added setting to enable/disable CD access time simulation
  both currently not implemented in the madmad interface.

[Core/CPU]

* Improved 68K/Z80 synchronization (reverted.. kills sound for Earthworm Jim)

* Fixed Z80 core compilation warnings (unused variable)

* Fixed 68k timing of BTST Dn,#Imm instruction (verified by Flamewing in original microcode)

* Fixed M68K STOP instruction edge case (case where STOP instruction unmasks pending interrupt)

* Fixed sub 68K DIVU instruction timings

* Added Z80 wait-states on 68k bus access (fixes Remute RedEyes demo)

* Fixed 68k timings of ANDI.L #Imm,Dn, ADDQ.W #Imm,An and TAS instructions (cf. Yacht.txt) + corrected typo in BTST Dn,#Imm instruction timings on SUB-CPU side

[Core/IO]

* Improved 6-buttons controller emulation (fixes 'ToeJam & Earl in Panic on Funkotron')

* Added short description of I/O ports (credits to Charles MacDonald for original documentation)

* Fixed regression with 6-buttons control pad emulation (fixes Duke Nukem 3D)

[Core/MD]

* Fixed SRAM power-on state with games larger than 2MB (Duke Nukem 3D, Triple Play 96, Triple Play - Gold Edition)

* Fixed savestate when Boot ROM is running

* Fixed SSF2 mapper size limit

* Fixed ROM size detection when enabling/disabling SRAM on power-on (fixes SRAM support in Hardball 95, NBA Hang Time and other 3MB games with SRAM mapped at 0x300000)

* Optimized SRAM word accesses on big-endian platform

* Added support for more RADICA dumps

* Added support for new X-in-1 pirate mappers

* Added support for Triple Play 96 & Triple Play - Gold Edition real Mask ROM dumps

* Added Rock Heaven / Rock World pirate cartridges protection emulation

* Added emulation of "Micro Machines USA" on-board TMSS bypass logic hardware (fixes lockout when TMSS Boot ROM is enabled)

* Improved SVP chip auto-detection (based on SVP reverse-engineering from https://github.com/jdesiloniz/svpdev/wiki/Internal-ROM)

* Added SRAM support for games larger than 8MB

* Fixed Game Genie / (Pro) Action Replay lock-on support with ROM larger than 8MB

* Added support for MegaSD CD hardware overlay (MD+ hacks) and extended SSF2 / ROM write mappers
  Not selectable in interface but emu will auto detect if you are running an MD+ image.

* Fixed MegaSD edge case occurring when 'play' command is sent while previous track fade out is still in progress

* Added automatic PAL region setting for Wiz'n'Liz European ROM dump

* Fixed MegaSD edge case when another 'pause' command is sent while fade out is still in progress

* Improved MD+ audio track loopback transitions master

* Added detection of CHD image files when loading MSU-MD (CD Mode 1) or MD+ (MegaSD) ROM files
  ( Please note: The cue file should still point to ".bin" or else the .CHD file won't be detected or loaded )

* Fixed Memory Mode, Timer and Font Color registers byte access at even address (verified on real hardware, cf. Krikzz's mcd-verificator)

* Disabled Boot ROM loading automatic detection when Mode 1 is enabled

* Fixed Boot ROM level 4 interrupt vector upper word value

* Fixed byte access address range to Font Data registers

[Core/MS]

* Improved region detection (fixes BIOS support with Japanese games)

* Added Missile Defense 3D [Proto] to internal database

* Added support for latest SMS Power ROM dumps

* Added support for Out-Run 3D prototype (dumped by SMS Power)

* Add Power Strike II to internal database as 50Hz game

* Added Street Battle (Proto) to Korean mappers database

* Added GG-MS games incompatible with EU/US Master System BIOS to internal game database

* Fixed disabled slot returned value

* Added support for new Korean xx-in-1 mapper (128 Hap, Game Mo-eumjip 188 Hap)

[Core/GG]

* Added support for latest SMS Power ROM dumps

[Core/SG]

* Improved SG-1000 cartridge memory mapping (fixes Safari Hunting crash when accessing unmapped ROM area)

* Fixed state loading for games using external RAM

[Core/Sound]

* Fixed EG counter loopback behavior (verified on real YM438 die by nukez)

* Added accurate YM2612 status & BUSY flag emulation.

* Accurate YM2612/3438 status read emulation on invalid port

* replaced configurable YM2612 DAC quantization by configurable YM2612 chip model emulation (discrete, ASIC-integrated or enhanced)
  (YM2612 Type: ?? option not selectable yet )

* added DAC distortion emulation for discrete YM2612 chip model

* added accurate status & BUSY flag emulation for discrete and ASIC-integrated YM2612 chip models (verified on real hardware)

* improved 9-bit DAC quantization accuracy for discrete and ASIC-integrated YM2612 chip models (verified on YM2612 die)

* Reverted change made to FM chip synchronization on CPU reads (fixes TMNT Tournament Fighters broken music when using Nuked core + Overdrive II demo music desyncing too fast with MAME/Nuked cores)

* Add nuked ym2413 core.. currently not accessible yet but I may add it into the interface later on.

* Fixed carrier/modulator phase reset after channel Key ON (fixes MS BIOS music )

* Fixed MAME YM2413 core instruments ROM (verified on YM2413B die, cf.)

* Fixed MAME YM2413 core EG resolution bits (verified on YM2413B die, cf.)

* Fixed MAME YM2413 core EG "dump" rate (verified on YM2413 real hardware, cf.)

* fixed MAME YM2413 core EG behavior for fastest attack rates (verified on YM2413 real hardware, cf.)

* fixed MAME YM2413 core EG behavior when SL = 0 (verified on YM2413 real hardware, cf.)

* Improved MAME YM2413 core EG sustain phase transition comparator accuracy (verified on YM2413 real hardware, cf.(

* Fixed MAME YM2413 core EG updates being 2x faster after EG resolution change and improved EG increment steps accuracy (verified on YM2413 real hardware, cf.)

* Improved MAME YM2413 EG transitions accuracy (verified against NUKED source )

* Updated nuked ym2612/ym3438 core to version 1.0.10 (fixed sound issues in Stormlord)

* Fixed MAME YM2612 core potential issue with SSG-EG inverted attenuation level on Key OFF

* Improved MAME YM2413 core EG attack phase algorithm accuracy (verified on YM2413 real hardware, cf.) and EG increment table consistency.

* Fixed overflow bug in MAME YM2413 core when using attack rate 14.3 (introduced in previous commit)

* Fixed Nuked YM2413 core attack phase rates 11.1 to 11.3 (cf. nukeykt/Nuked-OPLL#6)

* Fixed edge case in MAME YM2413 core when Key-Off occurs with envelope already off

[Core/SVP]

* Fixed pointer arithmetic on 64bit

--------------------------------------------------------------------------------------------------
Genesis Plus GX Sega Genesis/Megadrive/32X/SegaCD/MegaCD/SMS/GG Emulator for XBox v1.07b Madmab Ed

* Fixed issue where country region USA and Europe were switched.  Thus causing games to run at 50hz when Europe is selected and 60hz when USA is selected.

* Added in pixel perfect settings for SMS/GG so they should display correctly when using pixel perfect or fit to screen.  However if you use custom screen size with global set to yes there will be a mismatch between sms/gg and Genesis screens.

* A bunch of internal changes related to the sms/gg support.

---------------------------------------------------------------------------------------

Genesis Plus GX Sega Genesis/Megadrive/32X/SegaCD/MegaCD/SMS/GG Emulator for XBox v1.06b Madmab Ed

* updated to the latest Genesis Plus GX core, see below list. (thanks Xtecuter73)

* Added soft reset option to the "in-game" menu for the GX core.  A soft reset should not wipe the SRAM now.

* Fixed audio glitches when changing CDDA tracks on a Darkwater (bin/cue) image format.  This may be an issue with a bug in the buffering code which may need looking over rather than using the current fix.

* ROM images that access CDDA data (aka Sonic1 hack and Rock -n- Roll Racing hack) now work correctly.  Just do the same thing as with Pier Solar.  Make sure the cue and/or bin file has the same filename as the ROM file.  This works better with the cue file just make sure the filenames in the cue file are correct.

*******************************************
Genesis Plus GX 1.7.5 (xx/xx/xxxx) (Eke-Eke)
*******************************************

[Core/General]
---------------
* added optional dynamic allocation of cartridge/CD hardware buffer (for platforms with BSS size limitation)
* improved frame emulation timing, now starts with vertical blanking to reduce input lag by one more frame
(!!!warning: this breaks compatibility with previous savestates!!!)
* various code cleanup

[Core/CD]
---------------
* added CD-AUDIO & CD+G support
* added optional support for external VORBIS library
* added CDC & GFX register polling detection / synchronization
* improved CDC emulation (fixes random freezes during Jeopardy & ESPN Sunday Night NFL intro)
* improved emulation of mirrored memory areas
* improved savestate format
* improved Sub-CPU synchronization with Main-CPU (fixes "Soul Star")
* improved Main-CPU & Sub-CPU idle loop detection (fixes "Super League CD")
* disabled 68k and Z80 access to PRG-RAM when SUB-CPU is running (fixes USA version of Dungeon Explorer )
* disabled CD hardware reset on Soft-Reset (verified on real hardware)
* fixed DATA track minimal length (fixes BIOS refusing to boot small homebrew demos)
* fixed CDD "no disc" status code (fixes boot sequence loading time when no disc is loaded)
* fixed OGG file seeking when using with CUE file
* fixed PRG-RAM access from MAIN-CPU side on system reset
* fixed state loading bug when SUB-CPU interrupt is pending 
* fixed incorrect masking of Level 3 (GFX) interrupts (spurious freeze during Japanese BIOS intro)
* fixed H-INT vector handling when using Mode 1
* fixed access to "write-only" communication flags (verified on real hardware by Notaz)
* fixed pending level 1 interrupts when GFX interrupt is disabled (fixes random freezes out of "Batman Returns" option menu)
* fixed CDD seek command again (Final Fight CD freeze with model 2 BIOS)
* optimized Sub-CPU / Main-CPU synchronization

[Core/MD]
---------------
* added support for some new unlicensed games with copy protection (Thunderbolt II, Tom Clown, Chaoji Puke / Super Poker)
* added support for Everdrive extended SSF mapper
* improved console region auto-detection for a few PAL-only games (The Smurfs Travel the World & Williams Arcade's Greatest Hits)
* fixed Game Genie / Pro Action Replay lock-on support when Mega CD hardware is enabled 
* fixed SRAM support in Triple Play 96 & Triple Play - Gold Edition
* fixed automatic CD loading with .md ROM files
* fixed ROM padding for Sonic & Knuckles
* fixed SRAM detection for games where it is mapped to work RAM ("Feng Kuang Tao Hua Yuan" crash)
* fixed 1.7.4 regression with games using SRAM bank-switching

[Core/MS]
---------------
* added support for new SMS Power dump Jang Pung II (KR)
* added support for Hi-Com X-in-1 mapper (thanks to Bock from SMS Power)
* improved console hardware auto-detection
* improved emulation accuracy of SG-1000 & Mark-III hardware
* improved emulation accuracy of Japanese Master System I/O chip (315-5297)
* fixed Boot ROM loading when switching system hardware

[Core/GG]
---------------
* added optional LCD ghosting software filter
* fixed mirrored access to I/O control register (G-LOC Air Battle)

[Core/SG]
---------------
* added support for SG-1000 II clone hardware (2KB RAM + integrated VDP/PSG chip 315-5066)
* fixed SG-1000 internal RAM size (1KB instead of 2KB)
* restored SG-1000 Pause button support

[Core/CPU]
---------------
* fixed Z80 SP register initialization on power-on for Master System & Game Gear 
(Ace of Aces, Shadow Dancer, Ecco the Dolphin, Evander Holyfield Real Deal Boxing)

[Core/IO]
---------------
* added Sega Graphic Board support (thanks to SMS Power)
* added Master Tap emulation (multi-player support in Boom homebrew)
* added gamepad type auto-detection
* added support for XE-1AP analog controller on both ports 
* improved HVC latch behavior for gun emulation (fixes "Gunfight - 3 in 1" randomization when using Justifier)
* fixed TeamPlayer emulation (fixes multitap detection in Gauntlet 4)

[Core/VDP]
---------------
* implemented proper FIFO ring-buffer & unused bits behavior on CRAM/VSRAM reads (verified on real hardware by Nemesis)
* improved accuracy of DMA Copy/Fill & added support for CRAM/VSRAM Fill (verified on real hardware by Nemesis)
* improved V28/V30 mode switching during active display (verified on real hardware)
* improved Mode 5 sprites parsing accuracy (verified on real hardware)
* improved Mode 5 sprites rendering timings (fixes "Overdrive" demo)
* improved FIFO timings accuracy (fixes "Overdrive" Demo)
* improved H-Counter accuracy in H32 mode
* improved accuracy of Master System color palette brightness range (verified against real hardware)
* fixed misaligned buffer writes in Mode 4 when -DALIGN_LONG option is used
* fixed alpha channel for 15-bit (RGB555) and 32-bit (RGB888) color support
* fixed register #10 state on VDP¨reset (fixes GG Terminator 2: Judgment Day)
* fixed Mode 1 rendering (TMS99xx "text" mode)
* fixed Game Gear display rendering regression when left/right borders were disabled
* fixed 68k cycles delay on invalid VRAM writes (fixes "Microcosm" intro loop)
* optimized tile caching

*******************************************
Genesis Plus GX 1.7.4 (21/06/2013) (Eke-Eke)
*******************************************

[Core/SCD]
---------------
* fixed access to read-only registers on Main-CPU side ("Batman Returns" platform level freeze)
* fixed & improved emulation of PRG-RAM write protection register ("Lunar Eternal Blue" japanese version freeze)
* improved SUB & MAIN-CPU synchronization ("Dracula Unleashed" freeze when using US Model 2 BIOS)
* improved CPU polling detection
* improved CDD emulation & added CD drive access time for SEEK command ("Panic!/Switch" intro missing scene)
* added missing reinitialization of MAIN-CPU PRG-RAM bank on reset
* added .OGG audio tracks support through LIBTREMOR

[Core/Sound]
---------------
* fixed YM2612 configurable DAC depth emulation
* improved Low-Pass filter
* added optional "MONO" output mode

[Core/VDP]
---------------
* fixed FIFO access timings when using invalid write code value ("Clue" menu)
* fixed DMA Copy with undocumented code value ("Fatal Labyrinth" end sequence)
* minor code fixes & optimizations

[Core/CPU]
---------------
* optimized 68k stack read/write functions
* fixed broken 68k address error emulation
* fixed 68k interrupt behavior (prevents interrupts from being executed multiple time when 68k is halted)
* fixed Z80 registers initial state, added proper initialization when using PBC (verified on real hardware by Charles McDonald)

[Core/MD]
---------------
* fixed SRAM incompatibilities between BIG ENDIAN & LITTLE ENDIAN platforms (note: this breaks old .srm files with LITTLE ENDIAN platform ports)
* added support for a few recently dumped unlicensed games
* added auto-detection of byte-swapped ROM files

*******************************************
Genesis Plus GX 1.7.3 (26/11/2012) (Eke-Eke)
*******************************************

Nothing for the xbox.

*******************************************
Genesis Plus GX 1.7.2 (24/11/2012) (Eke-Eke)
*******************************************

[Core/SCD]
---------------
* added default TOC for Shadow of the Beast II (prevent hangs when audio tracks are missing)
* fixed CD-DA fader muting
* fixed PCM channels panning on reset
* fixed backup RAM file management when using disc swap with Mode 1 cartridge
* incremented CD drive read latency: fixes Space Adventure Cobra (freeze when opening coffin at 2nd morgue scene)
* improved CDD emulation accuracy: fixes Snatcher (freeze at the end of Act 2) & various CD player bugs
* improved MAIN-SUB memory map mirroring in SCD mode (verified on real hardware by Charles McDonald)
* implemented cycle-accurate "stopwatch" register emulation

[Core/Sound]
---------------
* fixed broken PSG noise frequency
* fixed incorrect Game Gear PSG stereo emulation
* implemented cycle-accurate Game Gear PSG stereo

[Core/VDP]
---------------
* fixed broken VDP DMA from SVP ROM latency (graphic errors in Virtua Racing)

[Core/MD]
---------------
* added Super Mario World 64 (unlicensed) cartridge hardware emulation

[Core/Input]
---------------
* added automatic detection for CD games with Justifier/Menacer support
* improved Justifier/Menacer emulation

-----------------------------------------------------------------------------------------------------

Genesis Plus GX Sega Genesis/Megadrive/32X/SegaCD/MegaCD/SMS/GG Emulator for XBox v1.05b Madmab Ed

* Fixed issue where sram was not being saved when running cartridges that access a CD (aka Pier Solar).  BTW if you want to hear the music tracks for Pier Solar.  Rename the FIRST track to match the name of your ROM image.  So if your rom is named "Pier Solar.bin" then rename the FIRST track of the cd image to "Pier Solar.iso".  This currently only works if both images are on your xbox hard drive.

-----------------------------------------------------------------------------------------------------

Genesis Plus GX Sega Genesis/Megadrive/32X/SegaCD/MegaCD/SMS/GG Emulator for XBox v1.04b Madmab Ed

* Updated to madmab edition interface CFv1b21. See "Interface Changelog.txt"

* Due to an improperly sized array the flicker filter level was resetting to 0 on game load.  Fixed.

* Enabled rewind for GX core.

* Missed some initialization code for cheat searches.
